<?php
class TmpInbound_Form_TmpInbound_Insert extends Zend_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{				
		//inbound_code
		$inbound_code=$this->createElement ( 'text', 'inbound_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_code' ))
		->setAttrib('class','lock ucase red bold')
		;
		
		//inbound_type
		$inbound_type=$this->createElement ( 'text', 'inbound_type' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_type' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_type' ))
		->setAttrib('class','lock ucase red bold')
		->setIgnore(true)
		;
		
		//inbound_note
		$inbound_note=$this->createElement ( 'textarea', 'inbound_note' )
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_note' ))
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_note' ))
		;
		
		//inbound_company_code
		$inbound_company_code=$this->createElement ( 'select', 'inbound_company_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_company_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_company_code' ))
		->setRequired(true)
		;
		
		//inbound_create_time
		$inbound_create_time=$this->createElement ( 'text', 'inbound_create_time' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_create_time' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_create_time' ))
		->setAttrib('class','lock')
		;
		
		//inbound_create_user
		$inbound_create_user=$this->createElement ( 'text', 'inbound_create_user' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_create_user' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_create_user' ))
		->setAttrib('class','lock')
		;
		
		//inbound_warehouse_keep_user
		$inbound_warehouse_keep_user=$this->createElement ( 'select', 'inbound_warehouse_keep_user' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_warehouse_keep_user' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_warehouse_keep_user' ))
		->setRequired(true)
		;
		
		//inbound_delivery_user
		$inbound_delivery_user=$this->createElement ( 'text', 'inbound_delivery_user' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_delivery_user' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_delivery_user' ))
		->setRequired(true)
		;
		
		//inbound_reason_code
		$inbound_reason_code=$this->createElement ( 'select', 'inbound_reason_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_reason_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_reason_code' ))
		->setRequired(true)
		;
		
		//inbound_reason_code_2
		$inbound_reason_code_2=$this->createElement ( 'select', 'inbound_reason_code_2' )
		->setAttrib("class","hide")
		->setIgnore(true)
		;
		
		//inbound_order_code
		$inbound_order_code=$this->createElement ( 'text', 'inbound_order_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_order_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_order_code' ))
		//->setRequired(true)
		;
		
		//inbound_warehouse_code
		$inbound_warehouse_code=$this->createElement ( 'select', 'inbound_warehouse_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_warehouse_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_warehouse_code' ))
		->setRequired(true)
		;
		
		//inbound_status
		$inbound_status=$this->createElement ( 'radio', 'inbound_status' )
		->setLabel ( $controller->getHelper('common')->getCaption('inbound_status' ))
		->setDescription ( $controller->getHelper('common')->getDescription('inbound_status' ))
		->setMultiOptions(array(1=>'Kích hoạt',0=>'Vô hiệu'))
		->setValue(1)
		;
		
		$this->addElements ( array (
			$inbound_code,
			$inbound_note,
			$inbound_company_code,
			$inbound_create_time,
			$inbound_create_user,
			$inbound_warehouse_keep_user,
			$inbound_delivery_user,
			$inbound_reason_code,
			$inbound_reason_code_2,
			$inbound_order_code,
			$inbound_warehouse_code,
			$inbound_status,
			$inbound_type,
		) );	
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}